Skip to content

Fix Ruff static analysis errors - #202

Closed
Eric3-jp wants to merge 1 commit into
SethMMorton:mainfrom
Eric3-jp:fix-ruff-static-analysis
Closed

Eric3-jp wants to merge 1 commit into
SethMMorton:mainfrom
Eric3-jp:fix-ruff-static-analysis

Conversation

@Eric3-jp

Copy link
Copy Markdown

Closes #200.

Ignore CPY001 as requested and move None to the end of the two unions flagged by RUF036 in the mixed-value sorting test. Ruff 0.16.8 also reports PLR0917 for two functions that already have local PLR0913 exemptions; extend those exemptions to cover positional argument counts while preserving their signatures.

Validation on Python 3.12 / Ubuntu 24.04:

  • ruff check: 38 diagnostics before (34 CPY001, two RUF036, two PLR0917), none after, using Ruff 0.16.8.
  • ruff format --check: all 42 files pass.
  • pytest --hypothesis-profile=slow-tests --tb=short --cov natsort --cov-report term-missing: 355 passed. The same 355 tests also passed before the changes.
  • python -m doctest -o IGNORE_EXCEPTION_DETAIL docs/howitworks.rst: passed.
  • pytest README.rst docs/examples.rst: passed.
  • pytest --doctest-modules natsort: 14 passed.
  • mypy --strict natsort tests: no issues in 32 source files.
  • python -m build and twine check dist/*: source distribution and wheel pass.

AI disclosure: This change was prepared and tested with OpenAI Codex.

@Eric3-jp Eric3-jp closed this by deleting the head repository Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix ruff static analysis errors.

1 participant